Menuitem class describes a single menu item. You can use all of the gadtools menus features expect Image menus here. Since Menuitem class is a subclass of Family class, you can add other menu items as children of a menu item to indicate sub menus. MUI does not limit the level of sub menus, but the operating system currently allows a maximum nesting level of one. Because of this, children of menu items should not contain other menu items for now, the results are unpredictable. Note: For handling menu items, MUIA_UserData and the methods MUIM_SetUData, MUIM_GetUData and MUIM_FindUData can become quite useful. See the Menu demo program and the accompanying documentation for details.
Attribute Ver ISG Type ----------------------------------- --- --- -------------------- MUIA_Menuitem_Checked V8 ISG BOOL MUIA_Menuitem_Checkit V8 ISG BOOL MUIA_Menuitem_CommandString V16 ISG BOOL MUIA_Menuitem_Enabled V8 ISG BOOL MUIA_Menuitem_Exclude V8 ISG LONG MUIA_Menuitem_Shortcut V8 ISG STRPTR MUIA_Menuitem_Title V8 ISG STRPTR MUIA_Menuitem_Toggle V8 ISG BOOL MUIA_Menuitem_Trigger V8 ..G struct MenuItem *
NAME MUIA_Menuitem_Checked -- (V8 ) [ISG], BOOL FUNCTION set/get the checked state of a checkit menu item. SEE ALSO MUIA_Menuitem_Checkit, MUIA_Menuitem_Enabled, MUIA_Menuitem_Exclude
NAME MUIA_Menuitem_Checkit -- (V8 ) [ISG], BOOL FUNCTION Set to TRUE and this item will become a checkmarkable item. SEE ALSO MUIA_Menuitem_Checked, MUIA_Menuitem_Enabled, MUIA_Menuitem_Exclude
NAME MUIA_Menuitem_CommandString -- (V16) [ISG], BOOL FUNCTION Set to TRUE if MUIA_Menuitem_Shortcut points to a command string (e.g. "shift alt q") instead of a simple letter. Note that MUI wont check if these keys are pressed (just like intuition), you'll have to do this yourself. SEE ALSO MUIA_Menuitem_Shortcut
NAME MUIA_Menuitem_Enabled -- (V8 ) [ISG], BOOL FUNCTION enabled/disalbe the menu item. SEE ALSO MUIA_Menuitem_Checkit, MUIA_Menuitem_Checked, MUIA_Menuitem_Exclude
NAME MUIA_Menuitem_Exclude -- (V8 ) [ISG], LONG FUNCTION bitmask of menu item numbers that are to be deselected when this one is selected. SEE ALSO MUIA_Menuitem_Checkit, MUIA_Menuitem_Enabled, MUIA_Menuitem_Checked
NAME MUIA_Menuitem_Shortcut -- (V8 ) [ISG], STRPTR SPECIAL INPUTS MUIV_Menuitem_Shortcut_Check FUNCTION Define the shortcut for a menu item. SEE ALSO MUIA_Menuitem_Title
NAME MUIA_Menuitem_Title -- (V8 ) [ISG], STRPTR FUNCTION Define the items title. May be NM_BARLABEL to create a horizontal bar. SEE ALSO MUIA_Menuitem_Shortcut
NAME MUIA_Menuitem_Toggle -- (V8 ) [ISG], BOOL FUNCTION Define the state of the TOGGLE flag for this item. SEE ALSO MUIA_Menuitem_Checkit, MUIA_Menuitem_Enabled, MUIA_Menuitem_Checked
NAME MUIA_Menuitem_Trigger -- (V8 ) [..G], struct MenuItem * FUNCTION This attribute is set to a pointer to the struct MenuItem of the item object when the item is selected. By setting up notification on this attribute with MUIV_EveryTime, you can react on menu actions and query the MenuItems flags immediately. Note that menu reactions are also possible any maybe a bit easier with MUIA_Application_ReturnID, MUIA_Application_MenuAction and MUIA_Window_MenuAction.
© 1998, Stefan Stuntz | [MUI Homepage] [Autodoc Index] [Feedback] | Updated: 01-Jan-98 |